package com.ysynzehao.dubbo.user;

import java.io.IOException;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.ysynzehao.dubbo.service.user.UserService;
import com.ysynzehao.dubbo.user.model.User;

public class ApplicationStart {
	
	private static UserService userService;
	
	@SuppressWarnings("resource")
	public static void main(String[] args) throws IOException {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:application-provider.xml");
		userService = applicationContext.getBean(UserService.class);
		User user = userService.getUser(1l);
		System.out.println(user);
		System.in.read();
	}

}
